package com.example.ruiji.dao.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.ruiji.pojo.Article;
import com.example.ruiji.utils.dos.ArchivedDo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.sql.Wrapper;
import java.util.List;

/**
 * Author:BaiYiChen
 * Date:2022/4/19 17:17
 *
 * @author BaiYiChen
 */
@Repository
public interface ArticleMapper extends BaseMapper<Article> {
  /**
   * 按年月统计文章
   * @return
   */
  List<ArchivedDo> articleArch();
  Integer insertArticle(Article article);
  IPage<Article> findByPage(IPage<Article> page, @Param("tId") Integer id);
  Long listArticleByTag(@Param("tId")Integer id);
  IPage<Article> findByDate(IPage<Article> page, @Param("date") String date);
  Long listArticleByDate(@Param("date")String date);
}
